import {ITEMTYPE,ADDADDRESS,EDITADDRESS,DELADDRESS,SAVEINDEX,CHANGECHECK,GETLIST,ADDRESSTYPE,REDUCENUM,ADDNUM,GETIMGS,CHECKALL,CHECKONE,GETSHOPCAR,GETCLASSIFY,IMGSTYPE,CLASSIFYTYPE,LISTTYPE} from "../types/store.d"

export const get_swiper=(para:IMGSTYPE)=>{
    return {
        type:GETIMGS,
        payload:para
    }
}
export const get_list=(para:LISTTYPE)=>{
    return {
        type:GETLIST,
        payload:para
    }
}
export const get_classify=(para:CLASSIFYTYPE)=>{
    return {
        type:GETCLASSIFY,
        payload:para
    }
}

export const add_shopcar=(para:ITEMTYPE)=>{
    return {
        type:GETSHOPCAR,
        payload:para
    }
}

export const save_index=(para:number)=>{
    return {
        type:SAVEINDEX,
        payload:para
    }
}

export const check_one=(para:string)=>{
    return {
        type:CHECKONE,
        payload:para
    }
}

export const check_all=(para:boolean)=>{
    return {
        type:CHECKALL,
        payload:para
    }
}

export const add_num=(para:string)=>{
    return {
        type:ADDNUM,
        payload:para
    }
}
export const reduce_num=(para:string)=>{
    return {
        type:REDUCENUM,
        payload:para
    }
}


export const change_check=()=>{
    return {
        type:CHANGECHECK,
        // payload:para
    }
}
export const add_address=(para:object)=>{
    return {
        type:ADDADDRESS,
        payload:para
    }
}

export const del_address=(para:number)=>{
    return {
        type:DELADDRESS,
        payload:para
    }
}

export const edit_address=(para:object)=>{
    return {
        type:EDITADDRESS,
        payload:para
    }
}